package com.friends.utils.validate.exception;

import lombok.Getter;
import lombok.Setter;

/**
 * @author Zhao Tianhao
 * @version 2024/04/09 11:27
 **/
@Getter
@Setter
public class MyRunTimeException extends RuntimeException{
    // 错误的状态码
    private Integer code;
    // 错误的消息
    private String message;

    public MyRunTimeException(Integer code , String message) {
        this.code = code ;
        this.message = message ;
    }

    public MyRunTimeException(String message) {
        this.code = 500;
        this.message = message ;
    }
}